Skip to content

Instantly share code, notes, and snippets.

@soof-golan
soof-golan / Dockerfile
Last active May 10, 2024 18:24
Python + Poetry + Docker Example
FROM python:3.10 as python-base
# https://python-poetry.org/docs#ci-recommendations
ENV POETRY_VERSION=1.2.0
ENV POETRY_HOME=/opt/poetry
ENV POETRY_VENV=/opt/poetry-venv
# Tell Poetry where to place its cache and virtual environment
ENV POETRY_CACHE_DIR=/opt/.cache
@happyendermangit
happyendermangit / main.css
Created April 7, 2024 19:09
whatsapp new mobile redesign for web (custom css)
/** modify voice message button color **/
button[aria-label="Voice message"] {
background-color: #21C063;
border-radius: 50px;
}
button[aria-label="Voice message"] svg {
width: 20px;
height: 20px;
}
@kuntau
kuntau / yify.md
Last active May 10, 2024 18:20
YIFY's Quality Encoding

For those that want to keep the YTS going (No, IDGAF about people that don't care for YTS quality) get HandbrakeCLI https://handbrake.fr/downloads... and use the following settings:

user@user:~$HandBrakeCLI -i /file/input.mp4 -o /file/out.mp4 -E fdk_faac -B 96k -6 stereo -R 44.1 -e x264 -q 27 -x cabac=1:ref=5:analyse=0x133:me=umh:subme=9:chroma-me=1:deadzone-inter=21:deadzone-intra=11:b-adapt=2:rc-lookahead=60:vbv-maxrate=10000:vbv-bufsize=10000:qpmax=69:bframes=5:b-adapt=2:direct=auto:crf-max=51:weightp=2:merange=24:chroma-qp-offset=-1:sync-lookahead=2:psy-rd=1.00,0.15:trellis=2:min-keyint=23:partitions=all

Reason to use CLI over GTK has to do with lack of support for advanced settings for Handbrake GTK

** Don't Re-encode already shitty encodes...get good source!**

Note : These are the settings i wrote by observing the Mediainfo of RARBG Encodes , these might not be 100% identical to RARBG Encodes.
These are FFMPEG Settings.
See comment below to see the code
@igorcosta
igorcosta / cpf_cnpj_validator
Created June 26, 2014 19:13
Regex para validar CPF e CNPJ
Para CPF
/^\d{3}\.\d{3}\.\d{3}\-\d{2}$/
Para CNPJ
/^\d{2}\.\d{3}\.\d{3}\/\d{4}\-\d{2}$/
Para ambos ao mesmo tempo
@barbietunnie
barbietunnie / udemy-courses-download-using-cookies.md
Last active May 10, 2024 18:17
Downloading Udemy videos with youtube-dl

How to download your Udemy course videos using youtube-dl

$ youtube-dl --list-extractors | grep udemy

Steps

  1. Get link to the course to download. e.g. https://www.udemy.com/course-name/
  2. Login into udemy website, save the cookie from chrome using Chrome (Cookie.txt)[1] export extension. Save it to file udemy-cookies.txt
  3. Get the link of the video that you want to download. usually in format. Use the command provided below where you have to replace the {course_link} and {path_to_cookies_file} with respective paths.
$ youtube-dl {course_link} --cookies {path_to_cookies_file}
@vookimedlo
vookimedlo / macos_mute_unmute.md
Last active May 10, 2024 18:16
MacOS: mute & unmute from command line

Mute volume

osascript -e "set volume with output muted"

Unmute volume

osascript -e "set volume without output muted"
@karpathy
karpathy / min-char-rnn.py
Last active May 10, 2024 18:13
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@xmonkee
xmonkee / vscode-theme.json
Created February 22, 2024 03:27
Default VSCode themes for Zed
{
"$schema": "https://zed.dev/schema/themes/v0.1.0.json",
"name": "Visual studio code themes",
"author": "Microsoft",
"themes":[
{
"name": "Light (Visual Studio)",
"appearance": "light",
"style": {
"border": null,
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 10, 2024 18:16
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory